Scroll view example

This example shows the use of a scroll view as a controller for moving the map plane in a scene. The simplest usage, translating the scroll position coordinates to an object nodes translation attributes is implemented already in the studio project, while more advanced features are created in the program code.

A key aspect in using the scroll view is the controlling of input sensitivity based on the distance of the scroll view plane from the camera. This example uses a one-to-one mapping with the background plane by positioning them at the same distance and orientation from the camera. Scroll view and the background plane, however, are not tied together under the same translation because that way the input coordinate space would move along with the background plane during the user's panning gesture. By positioning the scroll view plane further from the camera, the sensitivity of scroll view gestures increases.

This example demonstrates the use of a raw InterpolatedValue instance in the program code for afflicting a z-offset (zoom) based on the velocity of the movement.

The scroll view as well as the trajectory list box components manipulate input to output coordinates through a value interpolator, effectively allowing for smoother gesture mappings that are often most suitable for touchscreen based interactions.

You can find the example in <KanziWorkspace>/Examples/Scroll_view.

See also

Using the Scroll View nodes

Examples